home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / mus / misc / RaveScope.lha / RaveScope / Developer / eaglerave.s < prev    next >
Encoding:
Text File  |  1998-09-22  |  29.3 KB  |  1,039 lines

  1. ;-------T-------T-------T-------T-------T-------T-------T-------T-------T-------T-------T----x
  2. ;Labels (16)    Instructions (48)                               Comments (30++)
  3. ;              $VER: EagleRave 1.2
  4. ;        Started: 980321
  5. ;       Location: Waratah.au, Malmö.se
  6. ;      Last drunk: 6 weeks ago
  7. ;    Last stoned: 3 weeks ago (M)
  8. ;           Mood: Homesick
  9. ;     Todays wishes: 1> LAG 2> Return to Sweden
  10. ;           Changed: 980322, 980323, 980324, 980413, 980414, 980415, 980416
  11. ;        Changed: 980818, 980819, 980827
  12.  
  13. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  14. *                                                   ...     *
  15. *    ::::::.::::::. :::::::.   .::  ::::::. .::::.  :::     *
  16. *    .::.::'.::..:: .::..::' ...`::..::..'' .::.    `'      *
  17. *    :::    :::: ::::::: `::.::::::'::::.::.::::::' :::     *
  18. *    ..................................................    *
  19. *                                                               *
  20. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  21.  
  22. ; Captain's log...
  23. ;
  24. ; 980321:2115    (001) Started this source today. Added some macros and stuff from SpaceScope+.
  25. ;        Now it will display an about requester when loaded from Eagleplayer.
  26. ; 980322:0420    (002) Added/inserted some routines for the message handling, but haven't
  27. ;        tried to assemble it yet.
  28. ; 980322:2357    (002) Now I have a simple engine which will wait until Eagleplayer wants it
  29. ;        to exit, whereupon it will exit and free everything. Seems to work fine.
  30. ; 980323:0334    (003) Included some routines from DeliRave and adapted them to this source.
  31. ;        They try to load the eaglerave config, if this cannot be done it will pop up
  32. ;        a filerequester asking for the location of the RaveScope. This works, I don't
  33. ;        know if the config-reading routine works since I haven't made a config yet.
  34. ; 980323:0413    (004) Added some more routines from DeliRave, to find/execute the RaveScope.
  35. ;        Works, it seems. Now I only need to make the RaveScope 'accept' this engine.
  36. ; 980324:0459    (004) Inserted some other routines that deal with updating the channel structs,
  37. ;        and tried to convert them to use Eagleplayer's format. Got confused. Inserted
  38. ;        the routines to open/close the timer.device while I were at it, don't know
  39. ;        if I'll need it.
  40. ; 980413:1954    (042) Scrapped most of this source. I'm going to change everything now to use
  41. ;        the hostfunctions.
  42. ; 980414:0023    (042) This works again now. Now let's try to get the display working...
  43. ; 980416:0311    (043) I inserted a routine by Buggs to obtain the sample position, length
  44. ;        and volume, and got it to work. But all channels do not seem to be displayed,
  45. ;        and EaglePlayer will crash when it tries to load a new module (I think it did
  46. ;        this before, then I got rid of it, and now it's back).
  47. ; 980416:0332    (043) Hmm.. I made some change, in er_ProcMsg I think, and now it won't work
  48. ;        at all. Eagleplayer will lock up completely, and the Ravescope never starts.
  49. ; 980416:1720    (043) This disappeared when I removed the temporary routine to tell the
  50. ;        RaveScope that the player is active, as I have now made it believe (in debug
  51. ;        mode) that it is always active. I had forgotten to check all eagle channels,
  52. ;        this was why the scope did not look correct (it only read 1 channel). And I
  53. ;        may have done some more change, at the moment Eagleplayer does not crash
  54. ;        anymore when changing modules.
  55. ; 980416:2136    (044) Those strange crashes are now gone it seems. I added a routine to always
  56. ;        output the exact name of the eagleplayer-message, and noticed that stopint/
  57. ;        startint was sent whenever the music stopped/started, so I made eaglerave send
  58. ;        appropriate messages to the RaveScope. This works, the only thing that remains
  59. ;        is to get the state when starting up (and no such message has been recieved).
  60. ;        Also I have problems with Buggs routine to check the sample pointers, they will
  61. ;        be zero way too often. Especially when there's only a loop running...
  62. ; 980418:1822    (045) Found a few bugs in the Update-channels routine. The most serious being
  63. ;        me forgetting to increment the pointer to buggs period storage for each channel.
  64. ;        This was what caused the channels to be blacked out! Also corrected minor bug
  65. ;        in that routine (only clearing the sample-length word-wise). And in the update
  66. ;        channel routine I would clear the flag that indicated that the structure was
  67. ;        being updated, could cause incorrect behaviour sometimes.
  68. ; 980819:1600    (050) Yesterday I changed this routine to call _rh_PlyActive whenever eagleplayer
  69. ;        started to play. Now I have changed the er_FindPort("Eagleplayer") routine to
  70. ;        Forbid() before the FindPort() and only Permit() again if the port could not be
  71. ;        found.
  72. ; 980827:2041    (054) To support the SaveConfig message, and a variable config-path, I made a
  73. ;        routine called er_GetCfgName. It will create the full pathname to the config
  74. ;        by looking at the config-path in the eagleplayer data structure. If not present,
  75. ;        the current directory will be used. When the saveconfig message comes from eagle,
  76. ;        I'll update this path and send a RMSG_SAVECONFIG message to the RaveScope, which
  77. ;        will then save its config.
  78. ; 980922:0007    (065) *** Released version 1.2 on Aminet with this source (065).
  79.  
  80.         IFD    _PHXASS_
  81.         MACHINE    68020
  82.         ENDC
  83.  
  84. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  85. *
  86. *        Includes &c
  87.  
  88.         SECTION EngineCode,Code
  89.  
  90.         INCDIR    include:
  91.         INCLUDE    exec/exec_lib.i
  92.         INCLUDE    exec/exec.i
  93.         INCLUDE    exec/tasks.i
  94.         INCLUDE    devices/timer_lib.i
  95.         INCLUDE    devices/timer.i
  96.         INCLUDE    dos/dos_lib.i
  97.         INCLUDE    dos/dos.i
  98.         INCLUDE    dos/dostags.i
  99.         INCLUDE graphics/graphics_lib.i
  100.         INCLUDE    graphics/gfx.i
  101.         INCLUDE    hardware/intbits.i
  102.         INCLUDE    intuition/intuition_lib.i
  103.         INCLUDE    intuition/intuition.i
  104.         INCLUDE    libraries/gadtools_lib.i
  105.         INCLUDE    libraries/gadtools.i
  106.         INCLUDE    libraries/reqtools.i
  107.         INCLUDE    libraries/reqtools_lib.i
  108.         INCDIR    ""
  109.         INCLUDE    eagleplayer/EaglePlayer.i
  110.         INCLUDE    eagleplayer/EagleplayerEngine.i
  111.         INCLUDE    include/monoscope.i
  112.         INCLUDE    include/ravescope.i
  113.         INCLUDE    include/eaglerave.i
  114.  
  115.         XREF    _rh_InitHost                * Init this host
  116.         XREF    _rh_FreeHost                * Free everything done in InitHost
  117.         XREF    _rh_AllocSig                * Allocate a signal
  118.         XREF    _rh_FreeSig                * Free a signal
  119.         XREF    _rh_AddSig                * Add sig (d0) to the signalmask
  120.         XREF    _rh_RemSig                * Remove sig (d0) from the sigmask
  121.         XREF    _rh_ProcMsgs                * Process msgs from Rave
  122.         XREF    _rh_SignalRave                * PutMsg Rave & wait IF WE HAVE IT
  123.         XREF    _rh_TellRave                * PutMsg Rave IF WE HAVE IT
  124.         XREF    _rh_PlyActive                * Tell Rave we're playing
  125.         XREF    _rh_UpdateChans                * Update the channel structures
  126.         XREF    _rh_OpenLibs                * Open dos, intuition and reqtools.library
  127.         XREF    _rh_CloseLibs                * Close dos, intuition and reqtools.library
  128.  
  129. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  130. *
  131. *        Constants
  132.  
  133. NO:        EQU    0
  134. YES:        EQU    1
  135. MYDEBUG:    EQU    NO
  136. DEBTIME:    EQU    0
  137. er_RELEASE:    EQU    YES
  138. er_VERSION:    EQU    102
  139.  
  140. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  141. *
  142. *        Macros
  143.  
  144.  
  145. PUSH:        MACRO
  146.         IFC    "\1","ALL"
  147.         movem.l    d0-a6,-(sp)
  148.         ELSE    
  149.         movem.l    \1,-(sp)
  150.         ENDC
  151.         ENDM
  152.  
  153. POP:        MACRO
  154.         IFC    "\1","ALL"
  155.         movem.l    (sp)+,d0-a6
  156.         ELSE    
  157.         movem.l    (sp)+,\1
  158.         ENDC
  159.         ENDM
  160.  
  161. CALLLVO:    MACRO
  162.             jsr    _LVO\1(a6)
  163.         ENDM
  164. JUMPLVO:    MACRO
  165.             jmp    _LVO\1(a6)
  166.         ENDM
  167.  
  168. CALLEXE:    MACRO
  169.         move.l    rh_oSysBase(a5),a6
  170.             jsr    _LVO\1(a6)
  171.         ENDM
  172. JUMPEXE:    MACRO
  173.         move.l    rh_oSysBase(a5),a6
  174.             jmp    _LVO\1(a6)
  175.         ENDM
  176.  
  177. CALLDOS:    MACRO
  178.         move.l    rh_oDOSBase(a5),a6
  179.             jsr    _LVO\1(a6)
  180.         ENDM
  181. JUMPDOS:    MACRO
  182.         move.l    rh_oDOSBase(a5),a6
  183.             jmp    _LVO\1(a6)
  184.         ENDM
  185.  
  186. CALLITN:    MACRO
  187.         move.l    rh_oIntuiBase(a5),a6
  188.             jsr    _LVO\1(a6)
  189.         ENDM
  190. JUMPITN:    MACRO
  191.         move.l    rh_oIntuiBase(a5),a6
  192.             jmp    _LVO\1(a6)
  193.         ENDM
  194.  
  195. CALLREQ:    MACRO
  196.         move.l    rh_oRTBase(a5),a6
  197.         jsr    _LVO\1(a6)
  198.         ENDM
  199. JUMPREQ:    MACRO
  200.         move.l    rh_oRTBase(a5),a6
  201.         jmp    _LVO\1(a6)
  202.         ENDM
  203.  
  204.         IFNE    MYDEBUG                    * Debug macro. Link with include:
  205.         XRef    KPrintF                    * link/debug.lib & link/amiga.lib
  206.         ENDC
  207.  
  208. DBUG:        MACRO
  209.         IFNE    MYDEBUG
  210.         IFNE    NARG-1
  211.         subq.w    #1,.Ctr\@
  212.         bne    .Skip\@
  213.         move.w    #\2,.Ctr\@
  214.         bra    .Debug\@
  215. .Ctr\@:        dc.w    1
  216.         ELSE
  217.         bra    .Debug\@
  218.         ENDC
  219. .Str\@:        dc.b    "EAGL: ",\1,0
  220.         EVEN
  221. .Debug\@:    DBUGIT    .Str\@
  222. .Skip\@:    *+-
  223.         ENDC
  224.         ENDM
  225.  
  226. DBUGIT:        MACRO
  227.         IFNE    MYDEBUG
  228.         PUSH    ALL
  229.         move.l    4.w,a6
  230.         CALLLVO    Forbid
  231.         lea    \1,a0
  232.         CLEARA    a1
  233.         jsr    KPrintF
  234.         CALLLVO    Permit
  235.         IFNE    DEBTIME
  236.         move.l    rh_oDOSBase(a5),d0
  237.         beq    .Skip\@
  238.         move.l    d0,a6
  239.         move.l    #DEBTIME,d1
  240.         CALLLVO    Delay
  241.         ENDC
  242. .Skip\@:    POP    ALL
  243.         ENDC
  244.         ENDM
  245.  
  246. LEASTR:        MACRO
  247.         bsr    .skip\@
  248.         dc.b    \1,0
  249.         EVEN
  250. .skip\@:    move.l    (sp)+,\2
  251.         ENDM
  252.  
  253. SETERR:        MACRO
  254.         tst.l    rh_oError(a5)                ;Error code already set?
  255.         bne    .Skip\@                    ;Yes, skip
  256.         move.l    \1,rh_oError(a5)            ;Set new error
  257. .Skip\@:    *+-
  258.         ENDM
  259.  
  260. ERRMSG:        MACRO
  261.         LEASTR    \1,a0
  262.         SETERR    a0
  263.         ENDM
  264.  
  265. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  266. *
  267. *        ENGINE IDENTIFIER
  268.  
  269. er_Begin:    bra.w    er_Start                ;MUST be a BRA.W !
  270.         EUSN_Identifier                    ;Identifier "EPEngine"
  271.         dc.l    0                    ;eus_next, Don`t Use!
  272.         dc.w    0 ;-2*MYDEBUG                ;eus_Usernr (don't use)
  273.         dc.l    0,0,0                    ;eus_EPBase, Freetable, Taskadr
  274.         dc.l    0,0,0                    ;eus_unused1-2, private jumptab
  275.         dc.l    er_TagList                ;eus_unused4
  276.         dc.w    0,0                    ;eus_ticks, eus_tickcounter
  277.         dc.l    EUIB_OnlyPlay!EUIB_OnlyActive         ;eus_tickflags
  278.         dc.l    USMB_Zipwin!USMB_ChangeConfig!USMB_ChangeInterrupt ;eus_msgflags
  279.         dc.l    er_EngineName                ;eus_PName, processname of this Engine
  280.         dc.l    er_MyParsecName                ;Creatorname e.g Parsec
  281.         dc.l    er_MyInfo                ;tells something about this Engine.
  282.         dc.w    39                    ;eus_Kickstart
  283.         dc.l    EAGLEVERSION-1                ;eus_EPVersion
  284.         dc.w    1,2                    ;eus_version
  285.         dc.l    er_MyUsername                ;eus_username, Name for PullDownMenu (max.14 Chars)
  286.         dc.w    268, 167                ;eus_winx, eus_winy
  287.         dc.w    EUSB_Openwin                ;Flags (iconify/zipwin,openwin)
  288.         dc.l    0,0,0                    ;EUS_Special1-3
  289.         dc.l    22<<24!(9<<16)!1998            ;EUS_Creatordate
  290.         dc.b    -4                    ;EUS_Priority
  291.         dc.b    EUTY_Scope                ;Userprogramtype (0=unknown)
  292.         dc.w    0                    ;Set zero, don`t change
  293.         dc.l    0,0,0,0                    ;EUS_Reserved3-6
  294.         IFNE    (*-er_Begin)-EUS_SizeOF            ;Check that size is correct
  295.         FAIL    "Men Hallå"
  296.         ENDC
  297.  
  298. er_Version:    dc.b    "$VER: RaveScope-Engine 1.2 (22.9.98)"
  299.         EVEN
  300.  
  301. er_TagList:    dc.l    EUT_SpecialinfoLNr,LNrE_SpecialInfo_SpaceScope
  302.         dc.l    EUT_AttnFlags, AFF_68020
  303.         dc.l    0
  304.  
  305. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  306. *
  307. *        Program start
  308.  
  309. er_Start:    lea    er_Data,a5
  310.         DBUG    "** Entered er_Start\n"
  311.         bsr    er_Init
  312.         beq    .Error
  313.         bsr    er_Main
  314.         bsr    er_CleanUp
  315.         moveq    #1,d0
  316.         DBUG    "Exiting engine OK.\n"
  317.         rts
  318. .Error:        bsr    er_CleanUp
  319.         DBUG    "Exiting engine because of ERROR.\n"
  320.         moveq    #0,d0
  321.         rts
  322.  
  323.  
  324. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  325. *
  326. *        Main loop
  327.  
  328. er_Main:    DBUG    "Going to sleep in the main loop.\n\n"
  329. .Loop:        move.l    rh_oSigMask(a5),d0            * Get signal mask
  330.         CALLEXE    Wait                    * and wait.
  331.  
  332.         move.b    er_oSignal(a5),d1
  333.         bclr.l    d1,d0                    * Got interrupt signal?
  334.         beq    .NoInt
  335.  
  336.         move.l    d0,-(sp)
  337.         lea    er_UpdChans,a2
  338.         moveq    #4,d1                    * Make room for 4 channels
  339.         jsr    _rh_UpdateChans
  340.         move.l    (sp)+,d0                * Any more signals set?
  341.         beq    .Loop                    * No, go back to sleep
  342.  
  343. .NoInt:        DBUG    "Yawn...\n"
  344. .NoDeb:        bclr.l    #SIGBREAKB_CTRL_C,d0            * Got quit-signal?
  345.         bne    .Quit
  346.  
  347.         move.b    ([er_oMsgPort,a5],MP_SIGBIT),d1        * Got a message from Eagleplayer?
  348.         bclr.l    d1,d0
  349.         beq    .ChkRave                * No
  350.  
  351.         move.l    d0,-(sp)
  352. .GetEagle:    move.l    er_oMsgPort(a5),a0            * Wait for message to arrive
  353.         CALLEXE    GetMsg
  354.         tst.l    d0                    * Got message?
  355.         beq    .EagleOk                * No, done
  356. .GotEagle:    bsr    er_ProcMsg                * Process message
  357.         bne    .GetEagle                * Continue
  358.         move.l    (sp)+,d0                * Got quit-message
  359.         bra    .Quit
  360. .EagleOk:    move.l    (sp)+,d0
  361.  
  362. .ChkRave:    move.b    MP_SIGBIT(a5),d1            * Got a msg from the RaveScope?
  363.         btst.l    d1,d0
  364.         beq    er_Main                    * No
  365.         jsr    _rh_ProcMsgs
  366.         bra    er_Main
  367.  
  368. .Quit:        st    rh_oHostQuit(a5)
  369. .RemMsgs:    bsr    er_PollMsg                * Remove the last messages from
  370.         bne    .RemMsgs                * the Eagleport and check for
  371.         DBUG    "Exiting Main.\n\n"            * USClass_Exit
  372.         rts
  373.  
  374.  
  375. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  376. *
  377. *        Process message, return Z set if USClass_Exit message recieved.
  378.  
  379. er_ProcMsg:    move.l    d0,a1
  380.         move.l    er_oMsgPort(a5),UM_UserPort(a1)
  381.  
  382.         lea    er_Begin,a2
  383.         move.w    EUS_UserNr(a2),UM_UserNr(a1)
  384.         move.l    rh_oThisTask(a5),UM_TaskAdr(a1)
  385.         CLEAR    d0
  386.         move.b    er_oSignal(a5),d0
  387.         move.l    d0,UM_Signal(a1)
  388.  
  389.         move.w    UM_Class(a1),d3
  390.         move.l    UM_Type(a1),d7
  391.         move.l    UM_StructAdr(a1),er_oUPSStruct(a5)    * Get UPS_StructAdr
  392.  
  393.         IFNE    MYDEBUG                    * Identify the message
  394.         move.w    d3,d0
  395.         cmp.w    #37,d0
  396.         bls    .MsgOk
  397.         moveq    #38,d0
  398. .MsgOk:        move.l    (er_DebMsgPtrs,pc,d0*4),a0
  399.         DBUG    "Got "
  400.         DBUGIT    (a0)
  401.         LEASTR    " message.\n",a0
  402.         DBUGIT    (a0)
  403.         ENDC
  404.  
  405.         move.l    a1,-(sp)
  406.         cmp.w    #USClass_StartInt,d3            * Got the startint msg?
  407.         bne    .NoStart
  408.         jsr    _rh_PlyActive                * Tell the RaveScope that we're playing
  409.         bra    .MsgDone
  410.  
  411. .NoStart:    cmp.w    #USClass_StopInt,d3            * Got the stopint msg?
  412.         bne    .NoStop
  413.         move.w    #RMSG_PLYHALTED,d0            * Tell the RaveScope (if we have
  414.         clr.b    rh_oPlaying(a5)                * it) that we're not playing.
  415.         jsr    _rh_SignalRave                * Set our local play-flag            
  416.         bra    .MsgDone
  417.  
  418. .NoStop:    cmp.w    #USClass_Exit,d3            * Exit engine? (only to Engine)
  419.         bne    .NoExit
  420.         st    rh_oHostQuit(a5)            * Set the host quit flag
  421.         clr.l    UM_Signal(a1)
  422.         clr.l    UM_TaskAdr(a1)
  423.         clr.b    er_oNotifyEP(a5)            * No need to notify EP about exit
  424.         bra    .MsgDone
  425.  
  426. .NoExit:    cmp.w    #USClass_Hide,d3            * Iconify?
  427.         bne    .NoHide
  428.         move.w    #RMSG_DOICONIFY,d0
  429.         jsr    _rh_TellRave
  430.         bra    .MsgDone
  431.  
  432. .NoHide:    cmp.w    #USClass_Show,d3            * De-iconify?
  433.         bne    .NoShow
  434.         move.w    #RMSG_DEICONIFY,d0
  435.         jsr    _rh_TellRave
  436.         bra    .MsgDone
  437.  
  438. .NoShow:    cmp.w    #USClass_SaveConfig,d3
  439.         bne    .NoSave
  440.         bsr    er_GetCfgName                * Update config name
  441.         beq    .MsgDone                * Couldn't, so don't save config
  442.         move.w    #RMSG_SAVECONFIG,d0            * Then ask the RaveScope to save it
  443.         jsr    _rh_TellRave
  444.         bra    .MsgDone
  445.  
  446. .NoSave:    cmp.w    #USClass_Answer,d3            * Command came back, in UM_Arg
  447.         bne    .MsgDone                * UM_Arg2 results...?
  448.         move.l    UM_Argstring(a1),d0
  449.         beq    .MsgDone
  450.         clr.l    UM_Argstring(a1)
  451.  
  452. .MsgDone:    move.l    (sp)+,a1
  453.         cmp.l    #USM_UserPrg,d7                * Did we send this message?
  454.         beq    .NoReply                * Yes, so don't reply to it
  455.         DBUG    "Replying to the message.\n"
  456.         CALLEXE    ReplyMsg
  457.  
  458. .NoReply:    cmp.w    #USClass_Exit,d3            * Exit engine?
  459.         rts
  460.  
  461.  
  462. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  463. *
  464. *        Init everything
  465.  
  466. er_Init:    DBUG    "** Entered er_Init.\n"
  467.         move.l    er_Begin+EUS_EPBase,a0            * UPSStructure valid?
  468.         tst.l    EPG_UPS_Structure(a0)
  469.         sne    rh_oPlaying(a5)                * Yes, that means msx is playing
  470.  
  471.         bsr    er_GetCfgName                * Get config path and name in a1
  472.         beq    .Error                    * Couldn't, so exit
  473.         LEASTR    "EaglePlayer",a0            * Name of the host
  474.         CLEARA    a2                    * No tags!
  475.         jsr    _rh_InitHost                * Init it...
  476.         beq    .Error                    * Serious error, quit and report failure...
  477.  
  478.         bsr    er_OpenTimer                * Open timer.device
  479.         beq    .Error
  480.         bsr    er_EagleInfo                * Get some info from EaglePlayer
  481.         beq    .Error
  482.  
  483.         move.b    #SIGBREAKB_CTRL_C,d0            * Add CTRL-C signal to the mask
  484.         jsr    _rh_AddSig
  485.         jsr    _rh_AllocSig                * Allocate interrupt signal
  486.         move.b    d0,er_oSignal(a5)
  487.         bmi    .Error
  488.  
  489.         bsr    er_MakeMsgPort                * Create message port
  490.         beq    .Error
  491.         bra    er_FirstMsg                * Send the first message
  492. .Error:        moveq    #0,d0
  493.         rts
  494.  
  495. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  496. *
  497. *        Clean up everything
  498.  
  499. er_CleanUp:    DBUG    "** Entered er_CleanUp\n"
  500.         tst.b    er_oNotifyEP(a5)            * Need to notify Eagleplayer?
  501.         beq    .NoNotify                * No
  502.         bsr    er_LastMsg                * Send last quit-message
  503. .NoNotify:    bsr    er_FreeMsgPort                * Free the now emptied msg port
  504.  
  505.         lea    er_oSignal(a5),a0
  506.         jsr    _rh_FreeSig                * Free the signal-bit
  507.         bsr    er_CloseTimer                * Close timer.device &c
  508.         jmp    _rh_FreeHost                * Free the host
  509.  
  510.  
  511. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  512. *
  513. *        Get the full path and name to the config. Returns NULL=failure
  514.  
  515. er_GetCfgName:    CLEAR    d5                    * d5 = Don't close libs
  516.         tst.l    rh_oDOSBase(a5)                * Dosbase valid?
  517.         bne    .DosOk
  518.         jsr    _rh_OpenLibs                * No, open it
  519.         beq    .Error                    * Error!
  520.         moveq    #1,d5                    * d5 = Close libs when done
  521.  
  522. .DosOk:        move.l    er_Begin+EUS_EPBase,a0            * Get EP base
  523.         move.l    EPG_ConfigDirArrayPtr(a0),d1        * Config dir specified in EP?
  524.         beq    .NoCfgDir                * No, use current dir
  525.  
  526.         moveq    #SHARED_LOCK,d2
  527.         CALLDOS    Lock                    * Try to lock the config-dir
  528.         move.l    d0,d1                    * Successful?
  529.         beq    .NoCfgDir                * No
  530.         moveq    #1,d3                    * d3 = Need to UnLock later
  531.         move.l    d0,d4                    * d4 = UnLock this later
  532.         bra    .DirOk
  533.  
  534. .NoCfgDir:    CALLDOS    CurrentDir                * Get current directory
  535.         move.l    d0,d4                    * d4 = Old CD
  536.         moveq    #-1,d3                    * d3 = Need to CD back later
  537.  
  538. .DirOk:        move.l    d0,d1                    * Get lock to config-dir
  539.         lea    er_CfgPath,a2                * Store name here
  540.         clr.b    (a2)                    * Reset path
  541.         move.l    a2,d2
  542.         move.l    #512,d3                    * Size of buffer
  543.         CALLDOS    NameFromLock
  544.  
  545.         move.l    a2,d1                    * Add the name to the path
  546.         move.l    #er_CfgName,d2
  547.         move.l    #512+19,d3
  548.         CALLLVO    AddPart
  549.  
  550.         tst.l    d3                    * Need to UnLock or CurrentDir ?
  551.         bmi    .LastCD                    * CurrentDir()...
  552.         move.l    d4,d1                    * UnLock() the lock that we locked before
  553.         CALLDOS    UnLock
  554.         bra    .Exit
  555.  
  556. .LastCD:    move.l    d4,d1                    * Step back to old CD
  557.         CALLDOS    CurrentDir
  558.  
  559. .Exit:        move.l    a2,a1                    * Return a1 = full path to config
  560.         IFNE    MYDEBUG
  561.         DBUG    "Config path = "
  562.         move.l    a1,a0
  563.         DBUGIT    (a0)
  564.         LEASTR    "\n",a0
  565.         DBUGIT    (a0)
  566.         ENDC
  567.  
  568.         tst.l    d5                    * Close libs?
  569.         beq    .Out
  570.         jsr    _rh_CloseLibs
  571. .Out:        moveq    #1,d0                    * Set success
  572. .Error:        rts
  573.  
  574. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  575. *
  576. *        Get some information from EaglePlayer
  577.  
  578. er_EagleInfo:    move.l    er_Begin+EUS_EPBase,d0            * Get Eagleplayer's globals
  579.         beq    .Exit
  580.         move.l    d0,a0
  581.         move.l    EPG_SomePrefs(a0),er_oEPFlags(a5)    * Get some global EP flags
  582.         moveq    #1,d0
  583. .Exit:        rts        
  584.  
  585.  
  586. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  587. *
  588. *        Open timer.device & related stuff
  589.  
  590. er_OpenTimer:    DBUG    "Creating msg-port for use with timer.device.\n"
  591.         CALLEXE    CreateMsgPort
  592.         move.l    d0,er_oTimePort(a5)
  593.         beq    .Error
  594.  
  595.         DBUG    "Opening timer.device.\n"
  596.         lea    er_oTimeReq(a5),a1            * set ReplyPort for TimeRequest
  597.         move.l    d0,MN_REPLYPORT(a1)
  598.         lea    er_TimerName,a0                * Get timer.device name
  599.         moveq    #UNIT_VBLANK,d0
  600.         CLEAR    d1
  601.         CALLEXE    OpenDevice                * Open timer.device
  602.  
  603.         tst.l    d0                    * Successful? (NULL)
  604.         seq    er_oTimerOpen(a5)            * Set timer opened flag if so
  605.         tst.b    er_oTimerOpen(a5)
  606. .Error:        rts
  607.  
  608.  
  609. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  610. *
  611. *        Close timer.device & related stuff
  612.  
  613. er_CloseTimer:    tst.b    er_oTimerOpen(a5)            * Was timer.device opened?
  614.         beq    .NoTime
  615.         DBUG    "Closing timer.device.\n"        * Yes, so close it.
  616.         lea    er_oTimeReq(a5),a1
  617.         clr.b    er_oTimerOpen(a5)
  618.         CALLEXE    CloseDevice
  619.  
  620. .NoTime:    move.l    er_oTimePort(a5),d0            * Was msgport for timer created?
  621.         beq    .Exit
  622.         DBUG    "Deleting timer.device's msgport...\n"
  623.         move.l    d0,a0                    * Yes, delete it.
  624.         clr.l    er_oTimePort(a5)
  625.         JUMPEXE    DeleteMsgPort
  626. .Exit:        rts
  627.  
  628.  
  629. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  630. *
  631. *        Create message port to recieve messages from Eagleplayer
  632.  
  633. er_MakeMsgPort:    DBUG    "Creating message port...\n"
  634.         CALLEXE    CreateMsgPort
  635.         move.l    d0,er_oMsgPort(a5)
  636.         beq    .Error
  637.         move.b    ([er_oMsgPort,a5],MP_SIGBIT),d0        * Get message ports signal bit
  638.         jsr    _rh_AddSig
  639.         moveq    #1,d0
  640.         rts
  641. .Error:        ERRMSG    "Couldn't create messageport!"
  642.         moveq    #0,d0
  643.         rts
  644.  
  645.  
  646. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  647. *
  648. *        Free the eagleplayer dedicated message port
  649.  
  650. er_FreeMsgPort:    DBUG    "Freeing the message port...\n"
  651.         move.l    er_oMsgPort(a5),d0
  652.         beq    .Exit
  653. .EmptyPort:    bsr    er_PollMsg                * Make sure there's no msg left
  654.         bne    .EmptyPort
  655.         move.l    d0,a0
  656.         CALLEXE    DeleteMsgPort
  657.         move.b    ([er_oMsgPort,a5],MP_SIGBIT),d0        * Get message ports signal bit
  658.         jsr    _rh_RemSig
  659.         clr.l    er_oMsgPort(a5)
  660. .Exit:        rts
  661.  
  662.  
  663. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  664. *
  665. *        Send the first message, return Z for error
  666.  
  667. er_FirstMsg:    DBUG    "** Entered er_FirstMsg\n"
  668.         bsr    er_FindPort                * Find EaglePlayer's port
  669.         beq    .Exit
  670.  
  671.         st    er_oNotifyEP(a5)            * Must notify EP when quitting now
  672.         move.l    er_oMsgPort(a5),d3
  673.         move.l    rh_oThisTask(a5),d4
  674.         CLEAR    d5
  675.         move.b    er_oSignal(a5),d5
  676.         move.w    #USClass_NewUserPrg,d6
  677.         bsr    er_SendMsg
  678.         CALLEXE    Permit
  679.         moveq    #1,d0
  680. .Exit:        rts
  681.  
  682. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  683. *
  684. *        Send the last message
  685.  
  686. er_LastMsg:    DBUG    "** Entered er_LastMsg\n"
  687.         bsr    er_FindPort                * Eagleplayer still present?
  688.         beq    .Exit                    * No
  689.  
  690.         move.l    d0,a0                    * Portadresse
  691.         move.l    er_oMsgPort(a5),d3
  692.         bne    .Send
  693.         CALLEXE    Permit
  694.         bra    .Exit
  695.  
  696. .Send:        CLEAR    d4
  697.         CLEAR    d5
  698.         move.w    #USClass_Exit,d6
  699.         bsr    er_SendMsg
  700.         CALLEXE    Permit
  701.         DBUG    "Last message sent, waiting for reply..\n"
  702.         clr.b    er_oNotifyEP(a5)
  703.  
  704. .Wait:        move.l    er_oMsgPort(a5),a0
  705.         CALLEXE    WaitPort
  706.         bsr    er_PollMsg
  707.         ble    .Wait
  708. .Exit:        rts
  709.  
  710. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  711. *
  712. *        TASK    Poll a message from our port and reply to it.
  713. *        FLAGS    ZERO    If no message was found
  714. *            NEG    If an eagleplayer message was recieved (and replied)
  715. *            GT    If one of our messages was recieved (and freed)
  716.  
  717. er_PollMsg:    move.l    er_oMsgPort(a5),a0
  718.         CALLEXE    GetMsg                    * Get next message
  719.         tst.l    d0
  720.         beq    .Exit                    * No message, exit
  721.         move.l    d0,a1
  722.         cmp.l    #USM_UserPrg,UM_Type(a1)
  723.         beq    .Ours
  724.  
  725.         cmp.w    #USClass_Exit,UM_Class(a1)        * Got eagle's quit-message?
  726.         bne    .NoQuit
  727.         DBUG    "Got quit msg from EP (in PollMsg!)"
  728.         clr.b    er_oNotifyEP(a5)            * Must not notify EP now
  729.  
  730. .NoQuit:    DBUG    "Found a message! Replying to it...\n"    * Got an eagleplayer message
  731.         CALLLVO    ReplyMsg
  732.         moveq    #-1,d0
  733.         bra    .Exit
  734.  
  735. .Ours:        DBUG    "Reply to one of our msgs recieved.\n" * Got one of our messages back
  736.         moveq    #1,d0
  737. .Exit:        rts
  738.  
  739. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  740. *
  741. *        Send a message
  742.  
  743. er_SendMsg:    DBUG    "** Entered er_SendMsg\n"
  744.  
  745.         lea    er_oEagleMsg(a5),a1            * Messageadress
  746.         move.w    #UM_SizeOf-20,MN_LENGTH(a1)
  747.         move.b    #NT_MESSAGE,LN_TYPE(a1)            * Message type
  748.         move.l    #USM_UserPrg,UM_Type(a1)
  749.  
  750.         lea    er_Begin,a2
  751.         move.w    EUS_UserNr(a2),UM_UserNr(a1)
  752.  
  753.         move.l    d3,MN_REPLYPORT(a1)            ;Portadresse,an die zuruckgesendet wird
  754.         move.l    d3,UM_UserPort(a1)
  755.         move.l    d4,UM_TaskAdr(a1)
  756.         move.l    d5,UM_Signal(a1)
  757.         move.w    d6,UM_Class(a1)
  758.  
  759.         clr.l    UM_Command(a1)
  760.         clr.l    UM_Result(a1)
  761.         clr.l    UM_Argstring(a1)
  762.  
  763.         DBUG    "Sending the message...\n"
  764.         CALLEXE    PutMsg
  765.         moveq    #1,d0
  766. .Error:        rts
  767.  
  768. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  769. *
  770. *        Find the EaglePlayer port, return a0 = the port or NULL
  771.  
  772. er_FindPort:    DBUG    "Trying to find Eagleplayer's port...\n"
  773.         CALLEXE    Forbid
  774.         lea    er_EPortName,a1
  775.         CALLLVO    FindPort
  776.         move.l    d0,a0
  777.         tst.l    d0
  778.         bne    .Found
  779.         DBUG    "Not found!\n"
  780.         PUSH    d0/a0
  781.         CALLLVO    Permit
  782.         POP    d0/a0
  783.         bra    .Exit
  784. .Found:        DBUG    "Found!\n"
  785. .Exit:        tst.l    d0
  786.         rts
  787.  
  788.  
  789. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  790. *
  791. *        Update the channel structures
  792.  
  793. er_UpdChans:    move.l    er_oUPSStruct(a5),d0            * A module playing?
  794.         IFNE    MYDEBUG
  795.         beq    .NoUPS
  796.         ELSE
  797.         beq    .Exit
  798.         ENDC
  799.         move.l    d0,a2                    * a2 = UPS struct
  800.  
  801.         move.w    #64,scph_oMaxVolume(a4)
  802.         move.w    #4,scph_oNumChans(a4)
  803.         and.b    #~(SCPHF_16BITS!SCPHF_7BITS),scph_oFlags(a4)
  804.         or.b    #SCPHF_8BITS!SCPHF_SIGNED,scph_oFlags(a4)
  805.         move.l    scph_oChannels(a4),d0
  806.         IFNE    MYDEBUG
  807.         beq    .NoChans
  808.         ENDC
  809.         beq    .Exit
  810.         move.l    a4,-(sp)
  811.         move.l    d0,a4                    * a4 = dest channel struct
  812.  
  813.         moveq    #-1,d2                    * All Channels by default
  814.         move.w    UPS_Flags(a2),d1
  815.         and.w    #UPSB_DMACon,d1                * Correct?
  816.         beq    .NoDmaCon                * No
  817.         move.w    UPS_DMACon(a2),d2            * Get DMA mask
  818.         IFNE    MYDEBUG
  819.         move.w    d2,d7
  820.         and.w    #$F,d7
  821.         bne    .NoDmaCon
  822.         DBUG    "DmaCon is zero!\n",10
  823.         ENDC
  824. .NoDmaCon:    lea    .PermerkLevm,a3                * Smplperiod and play time 1/50s
  825.                                 * each 32 Bit = 2 words per channel
  826.         moveq    #4-1,d7
  827. .Loop:        bsr    .GetData
  828.         IFNE    MYDEBUG
  829.         tst.l    d0
  830.         bne    .SmplOk
  831.         add.b    #1,.Smpl
  832. .SmplOk:    tst.l    a0
  833.         bne    .LenOk
  834.         add.b    #1,.Len
  835.         ENDC
  836. .LenOk:        move.l    d0,scpc_oSampleLeft(a4)
  837.         move.l    d0,scpc_oLoopSize(a4)
  838.         move.w    d1,scpc_oVolume(a4)
  839.         move.l    a0,scpc_oSamplePos(a4)
  840.         move.l    a0,scpc_oSampleLoop(a4)
  841.         lea    scpc_SIZEOF(a4),a4
  842.         lea    UPS_Modulo(a2),a2
  843.         addq.w    #4,a3
  844.         dbra    d7,.Loop
  845.  
  846.         IFNE    MYDEBUG
  847.         cmp.w    #$404,.Smpl
  848.         bne    .SthSet
  849.         DBUG    "All sample pos and lens are zero!\n",10
  850.         bra    .SthSet
  851. .Smpl:        dc.b    0
  852. .Len:        dc.b    0
  853. .SthSet:    clr.w    .Smpl
  854.         ENDC    
  855.  
  856.         move.l    (sp)+,a4
  857.         moveq    #1,d0                    * Signal channels updated
  858.         rts
  859.         IFNE    MYDEBUG
  860. .NoUPS:        DBUG    "UPSStruct INVALID!\n",50
  861.         bra    .Exit
  862. .NoChans:    DBUG    "Channels INVALID!\n",1000
  863.         ENDC
  864. .Exit:        CLEAR    d0                    * Signal channels not updated
  865.         rts
  866.  
  867.  
  868. .PermerkLevm:    ds.l    4
  869.  
  870. ;-----------------------------------------------------------------------------------------------
  871. ;----------- fetch rest address, rest size, volume and period values from UPS-structure --------
  872. ;-----------------------------------------------------------------------------------------------
  873. ;    Input:    d2 = DMA mask (Bit 0 = 1 -> channel on, Bit 0 = 0 -> channel off)
  874. ;        a3 = buffer for period and playing time in 1/50 s of the sample of 
  875. ;                     current channel (2 words)
  876. ;           a2 = UPS_Structure for current channel
  877. ;
  878. ;    Output:    d2 = DMA Mask for next channel (1 Bit right shifted, D2 = D2>>1)
  879. ;             a3 (unchanged)
  880. ;             a2 (unchanged)
  881. ;             a0 = address of the sample
  882. ;             d0 = left size in Bytes
  883. ;             d1 = volume
  884. ;             d3 = period
  885.  
  886. .GetData:    move.l    d4,-(a7)
  887.         lsr.w    #1,d2
  888.         bcc    .null
  889.         move.l    UPS_Voice1Adr(a2),d1
  890.         beq    .null
  891.         move.l    d1,A0
  892.         move.w    UPS_Voice1Per(a2),d3
  893.         beq    .ok
  894.  
  895.         move.w    d3,(a3)
  896.         clr.w    2(a3)
  897.         CLEAR    d0
  898.         move.w    UPS_Voice1Len(a2),d0
  899.         add.l    d0,d0            ;Samplelänge Words -> Samplelänge Bytes
  900.         bra    .triggered        ;bra.s    .copyto
  901.  
  902. .ok        move.w    (a3),d3            ;überhaupt keine Sampleperiod übergeben ?
  903.         beq    .null
  904.         CLEAR    d0
  905.         move.w    UPS_Voice1Len(a2),d0
  906.         add.l    d0,d0            ;Samplelänge Words -> Samplelänge Bytes
  907.  
  908.         CLEAR    d4
  909.         move.w    2(a3),d4
  910.         cmp.w    #$180,d4        ;nur zur Sicherheit
  911.         blo    .hi1
  912.         clr.w    2(A3)
  913.         clr.w    d4
  914.  
  915. .hi1        swap    d4            ;=d4*65535
  916.         lsr.l    #2,d4
  917.         divu    (a3),d4            ;durch Sampleperiod
  918.         and.l    #$ffff,d4
  919.         lsl.l    #2,d4
  920.         cmp.l    d0,d4            ;größer als Samplelänge ?
  921.         blo    .cbm_ok
  922.  
  923.         tst.w    UPS_Voice1Repeat(a2)
  924.         beq    .cbm_loop
  925.  
  926.         CLEARA    a0            ;lea    nulls(a5),a0
  927.         subq.w    #1,2(a3)
  928.         clr.w    (a3)
  929.         CLEAR    d4
  930.         CLEAR    d0            ;move.w    #700,d0
  931.         bra    .cbm_ok
  932.  
  933. .cbm_loop    tst.l    d0
  934.         bne    .divu
  935.         clr.w    2(a3)
  936.         moveq    #0,d4
  937.         move.w    #700,d0
  938.         bra    .cbm_ok
  939. .divu
  940.         divu    d0,d4
  941.         swap    d4
  942. ;        clr.w    2(a3)            ;bloss raus lassen, dann sieht es
  943.                         ;nochmal so gut aus !!
  944.         and.l    #$ffff,d4
  945.  
  946. .cbm_ok        add.l    d4,a0            ;Sampleadr
  947.                         ;D0: Samplelen
  948.                         ;D3: SamplePer
  949.  
  950. .triggered:    move.w    UPS_Voice1Vol(a2),d1    ;
  951.  
  952.         cmp    #64,d1
  953.         bls    .vol_ok
  954.         moveq    #64,d1
  955. .vol_ok
  956.         addq.w    #1,2(a3)
  957. .no        move.l    (a7)+,d4
  958.         rts
  959.  
  960. .null:        CLEARA    a0        ;lea    nulls(a5),a0
  961.         CLEAR    d0        ;move.w    #700,d0
  962.         CLEAR    d1
  963.         move.l    (a7)+,d4
  964.         rts
  965.  
  966.  
  967. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  968. *
  969. *        Misc data
  970.  
  971. er_EngineName:    dc.b    "RaveScope-Engine.1",0
  972. er_MyUsername:    dc.b    "RaveScope",0
  973. er_MyParsecName    dc.b    "Erik Spåre",0
  974. er_MyInfo:    dc.b    "This engine makes it possible to use the RaveScope with Eagleplayer. "
  975.         dc.b    "The RaveScope is a separate executable which, once you have specified its path, "
  976.         dc.b    "will display waveforms in various ways.",10,10
  977.         dc.b    "Remember: Removing this engine does not necessarily mean that the RaveScope will "
  978.         dc.b    "quit too (unless you have checked the quit=kill menu item).",0
  979. er_EPortName:    dc.b    "EAGLEPLAYERPORT",0
  980. er_TimerName:    dc.b    "timer.device",0
  981. er_CfgName:    dc.b    "RaveScope.cfg",0
  982.         EVEN
  983.  
  984.         IFNE    MYDEBUG
  985. er_DebMsgPtrs:    dc.l    01$,02$,03$,04$,05$,06$,07$,08$,09$,10$    * Pointers to all the various
  986.         dc.l    11$,12$,13$,14$,15$,16$,17$,18$,19$,20$    * eagle player message names
  987.         dc.l    21$,22$,23$,24$,25$,26$,27$,28$,29$,30$
  988.         dc.l    31$,32$,33$,34$,35$,36$,37$,38$,39$
  989. 01$:        dc.b    "USClass_Dummy",0
  990. 02$:        dc.b    "USClass_Activate",0
  991. 03$:        dc.b    "USClass_DeActivate",0
  992. 04$:        dc.b    "USClass_Exit",0
  993. 05$:        dc.b    "USClass_Zipwin",0
  994. 06$:        dc.b    "USClass_Unzipwin",0
  995. 07$:        dc.b    "USClass_NewEngine",0
  996. 08$:        dc.b    "USClass_GetConfig",0
  997. 09$:        dc.b    "USClass_NewConfig",0
  998. 10$:        dc.b    "USClass_LockEP",0
  999. 11$:        dc.b    "USClass_UnLockEP",0
  1000. 12$:        dc.b    "USClass_Command",0
  1001. 13$:        dc.b    "USClass_Answer",0
  1002. 14$:        dc.b    "USClass_QuitEagle",0
  1003. 15$:        dc.b    "USClass_NewModule",0
  1004. 16$:        dc.b    "USClass_NewSong",0
  1005. 17$:        dc.b    "USClass_NewPreference",0
  1006. 18$:        dc.b    "USClass_StartInt",0
  1007. 19$:        dc.b    "USClass_StopInt",0
  1008. 20$:        dc.b    "USClass_PlaySample",0
  1009. 21$:        dc.b    "USClass_NewScrollText",0
  1010. 22$:        dc.b    "USClass_NewDirectory",0
  1011. 23$:        dc.b    "USClass_NewPlayer",0
  1012. 24$:        dc.b    "USClass_NewEngineLoaded ",0
  1013. 25$:        dc.b    "USClass_KillModule",0
  1014. 26$:        dc.b    "USClass_Surface",0
  1015. 27$:        dc.b    "USClass_ActiveSurface",0
  1016. 28$:        dc.b    "USClass_NewAmplifierlist",0
  1017. 29$:        dc.b    "USClass_Show",0
  1018. 30$:        dc.b    "USClass_Hide",0
  1019. 31$:        dc.b    "USClass_SaveConfig",0
  1020. 32$:        dc.b    "USClass_RemPlayerList",0
  1021. 33$:        dc.b    "USClass_RemEnginesList",0
  1022. 34$:        dc.b    "USClass_RemModulesList",0
  1023. 35$:        dc.b    "USClass_LoadConfig",0
  1024. 36$:        dc.b    "USClass_SetWaitPointer",0
  1025. 37$:        dc.b    "USClass_ClearWaitPointer",0
  1026. 38$:        dc.b    "USClass_EngineCommand",0
  1027. 39$:        dc.b    "ALIEN EP MESSAGE!"
  1028.         ENDC
  1029.  
  1030. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  1031. *
  1032. *
  1033.         SECTION EagleRaveBSS,BSS
  1034.  
  1035. er_Data:    ds.b    er_SIZEOF                * DATA USED BY RS-TABLE
  1036. er_CfgPath:    ds.b    512+20
  1037.  
  1038.  
  1039.